<?php
header ("Content-Type:text/html; charset= utf-8");
require_once ('config.php');
require_once (WEBURL.'/login_status_check.php');
if(!checkLogin()){
	$gotopage=base64_encode("article_add.php");
	header("Location:admin_login.php?gotopage=".$gotopage);
}
else{
	require_once (WEBURL.'/channel.class.php');
	$_SESSION['file_upload_allowed']="allowed";
	$smarty->assign("title","发布文章");
	$smarty->assign("time",date("Y-m-d H:i:s",time()));
	$smarty->assign("writer",$_SESSION['admin_name']);
	$channel=new Channel();
	$all_channel=$channel->getAllChannel("article");
	$smarty->assign("all_channel",$all_channel);
	$smarty->display("article_add.htm",md5("article_add.php"));
}
